You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > LogNormalFit Method > Statistics.LogNormalFit Method ([In] TVec, out double, out double, double[], double[], double)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.LogNormalFit Method ([In] TVec, out double, out double, double[], double[], double)

Calculate parameters for log-normally distributed values.

Syntax
C#
Visual Basic
public static void LogNormalFit([In] TVec X, out double mu, out double sigma, ref double[] PCIMu, ref double[] PCISigma, double Alpha);
Parameters 
Description 
[In] TVec X 
Stores data which is assumed to be log-normaly distributed. 
out double mu 
Return log-normal distribution parameter estimator M u. 
out double sigma 
Return log-normal distribution parameter estimator Sigma. 
ref double[] PCIMu 
Mu (1-Alpha)*100 percent confidence interval. 
ref double[] PCISigma 
Sigma (1-Alpha)*100 percent confidence interval. 
double Alpha 
Confidence interval percentage. 

RandomLogNormal

The following example generates 100 random log-normally distributed values and then uses NormalFit routine to extract used Mu and Sigma parameters

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector Data = new Vector(0); Data.Size(100, false); StatRandom.RandomLogNormal(3, 0.2, Data, -1); double mu, sigma; double[] MuCI = new double[2]; double[] SigmaCI = new double[2]; Statistics.LogNormalFit(Data, out mu, out sigma, out MuCI, out SigmaCI, 0.05); // mu approx 3.0 // sigma approx 0.2 } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!